package org.song.service.impl;

import org.song.mapper.ChatLogMapper;
import org.song.model.dto.ChatLogDto;
import org.song.model.vo.ChatLog;
import org.song.service.ChatLogService;
import org.song.service.impl.common.AbstractBaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.lang.NonNull;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChatLogServiceImpl extends AbstractBaseServiceImpl implements ChatLogService {

    @Autowired( required = true )
    @Qualifier( value = "chatLogMapper")
    private ChatLogMapper chatLogMapper;

    @Override
    public List<ChatLog> listChatLogs(@NonNull ChatLogDto chatLogDto) {
        return chatLogMapper.listChatLogs(chatLogDto);
    }


    @Override
    public int deleteChatLog( @NonNull ChatLog chatLog) {
        return chatLogMapper.deleteChatLog(chatLog);
    }

    @Override
    public int insertChatLog( @NonNull ChatLog chatLog) {
        return chatLogMapper.insertChatLog(chatLog);
    }

    @Override
    public int updateChatLog( @NonNull ChatLog chatLog) {
        return chatLogMapper.updateChatLog(chatLog);
    }

}
